<?php
/**
 * Created by PhpStorm.
 * User: tsy
 * Date: 2016/7/8
 * Time: 16:29
 */
namespace Admin\Model;
use Think\Model;

class CommonModel extends Model{
    protected $trueTableName = 'bypal_cust_info';
    /**
     * 查询身份证类型
     * @return mixed
     */
    public function select_identity_type(){
        $sql="select type_id,type_code,typename from bypal_cust_idtype";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }

    /**
     * 查询贷款申请类型
     * @return mixed
     */
    public function select_loan_type(){
        $sql="select lt_id,lt_code,lt_value from bypal_cust_loantype";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }

    /**
     * 查询婚姻状况
     * @return mixed
     */
    public function select_marray_status(){
        $sql="select m_id,m_code,m_name from bypal_cust_marital";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }

    /**
     * 查询最高学历
     * @return mixed
     */
    public function select_education_status(){
        $sql="select edu_id,edu_code,edu_name from bypal_cust_education";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }

    /**
     * 查询最高学位
     * @return mixed
     */
    public function select_degree_status(){
        $sql="select deg_id,deg_code,deg_name from bypal_cust_degree";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }

    /**
     * 查询联系人关系
     * @return mixed
     */
    public function select_relation_status(){
        $sql="select r_id,r_code,r_name from bypal_cust_relation";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }

    /**
     * 查询行业
     * @return mixed
     */
    public function select_industry_status(){
        $sql="select id,code,name from bypal_profession_info";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }

    /**
     * 查询职业
     * @return mixed
     */
    public function select_profession_status(){
        $sql="select pos_id,pos_code,pos_name from bypal_cust_position";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }

    /**
     * 查询职务
     * @return mixed
     */
    public function select_duty_status(){
        $sql="select du_id,du_code,du_name from bypal_cust_duty";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }

    /**
     * 查询职称
     * @return mixed
     */
    public function select_title_status(){
        $sql="select ti_id,ti_code,ti_name from bypal_cust_title";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }

    /**
     * 查询居住状况
     * @return mixed
     */
    public function select_live_status(){
        $sql="select li_id,li_code,li_value from bypal_cust_livestatus";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }

    public function select_current_status(){
        $sql="select cust_typeid,cust_typename from bypal_cust_typename ";
        $Model = new \Think\Model();
        $values=$Model->query($sql);
        return $values;
    }
}